<?php
require $_SERVER['DOCUMENT_ROOT'].'/../_core/common.php';
require $_SERVER['DOCUMENT_ROOT'].'/../_plugins/curls.php';

$username = isset($_POST['username']) ? h($_POST['username']) : '';
$password = isset($_POST['password']) ? $_POST['password'] : '';
$remind = (isset($_POST['remind'])&&$_POST['remind']==2) ? 2 : 1;

$msg = array('status'=>0);

if( $username != '' && $password != '' ){
	$msg['status'] = User::login($username, $password, $remind);//校验
}else{
	$msg['status'] = false;//参数有误
}

$myjson = json_encode($msg);
echo $myjson; 
exit;